<template>
  <el-row class="tac">
    <el-col :span="12">
      <el-menu
        default-active="1"
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose"
      >
      <el-menu-item index="1">
          <el-icon><location /></el-icon>
          <span>Navigator one</span>
        </el-menu-item>
        <el-menu-item index="2">
          <el-icon><icon-menu /></el-icon>
          <span>Navigator Two</span>
        </el-menu-item>
        <el-menu-item index="3">
          <el-icon><document /></el-icon>
          <span>Navigator Three</span>
        </el-menu-item>
        <el-menu-item index="4">
          <el-icon><setting /></el-icon>
          <span>Navigator Four</span>
        </el-menu-item>
      </el-menu>
    </el-col>
  </el-row>
</template>
<style scoped>
.el-menu-item.is-active {
  color: white;
  background-color: #2160f9;
}
.el-menu-item {
  width: 192px;
  height: 40px;
  opacity: 1;
  /* gap: 20px; */
  border-radius: 10px;
  display: flex;
  align-items: center;
}
.el-menu {
  width: 192px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  border-right: none;
}
</style>
<script lang="ts" setup>
import { Document, Menu as IconMenu, Location, Setting } from "@element-plus/icons-vue";
const handleOpen = (key: string, keyPath: string[]) => {
  console.log(key, keyPath);
};
const handleClose = (key: string, keyPath: string[]) => {
  console.log(key, keyPath);
};
</script>
